import { request } from "@ruifox-cms/utils";

//获取部门树
export function getDepartTree(params) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/system/depart/getDepartTree",
    method: "get",
    params,
  });
}
// 新增 保存部门
export function saveDepart(data) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/system/depart/saveDepart",
    method: "post",
    data,
  });
}
//修改部门
export function changeDepart(data) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/system/depart/changeDepart",
    method: "post",
    data,
  });
}

//删除部门
export function deleteDepart(params) {
  return request({ 
    baseURL: "/10101_api",
    url: "/oltes/api/v1/system/depart/deleteDepart",
    method: "post",
    params,
  });
}

//根据id查询
export function getDepartById(params) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/system/depart/getDepartById",
    method: "get",
    params,
  });
}
